/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package datas;

import beans.Patient;
import java.sql.CallableStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;

/**
 *
 * @author havn
 */
public class StaffObj {

    private connector con;

    public StaffObj() {
        con = new connector();
    }

    public boolean doLogin(String user, String pass) {
        try {
            CallableStatement call = con.getCon().prepareCall("{call dologin(?,?)}");
            call.setString(1, user);
            call.setString(2, pass);
            ResultSet rs = call.executeQuery();
            return rs.next();
        } catch (SQLException ex) {
            Logger.getLogger(StaffObj.class.getName()).log(Level.SEVERE, null, ex);
        }
        return false;
    }

    
}
